package com.social.service;

import java.util.List;

import com.social.daoEx.FriendMapperEx;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.social.dao.FriendMapper;
import com.social.dao.model.Friend;
import com.social.dao.model.FriendExample;

@Service
public class FriendService {
	@Autowired
	private FriendMapper friendMapper;
	@Autowired
	private FriendMapperEx friendMapperEx;

	public int countByExample(FriendExample example) {
		return this.friendMapper.countByExample(example);
	}

	public Friend selectByPrimaryKey(Integer id) {
		return this.friendMapper.selectByPrimaryKey(id);
	}

	public List<Friend> selectByExample(FriendExample example) {
		return this.friendMapper.selectByExample(example);
	}

	public int deleteByPrimaryKey(Integer id) {
		return this.friendMapper.deleteByPrimaryKey(id);
	}

	public int updateByPrimaryKeySelective(Friend record) {
		return this.friendMapper.updateByPrimaryKeySelective(record);
	}

	public int updateByPrimaryKey(Friend record) {
		return this.friendMapper.updateByPrimaryKey(record);
	}

	public int deleteByExample(FriendExample example) {
		return this.friendMapper.deleteByExample(example);
	}

	public int updateByExampleSelective(Friend record, FriendExample example) {
		return this.friendMapper.updateByExampleSelective(record, example);
	}

	public int updateByExample(Friend record, FriendExample example) {
		return this.friendMapper.updateByExample(record, example);
	}

	public int insert(Friend record) {
		return this.friendMapper.insert(record);
	}

	public int insertSelective(Friend record) {
		return this.friendMapper.insertSelective(record);
	}

	public List<Integer> selectFriends(Integer id){
		return this.friendMapperEx.selectFriends(id);
	}
}
